/// @description 步事件
// You can write your code in this editor


switch(state)
{
	case 0:
		speed = 0;
		sprite_index = sprBlueIdle;
	break;
	
	case 1:
		sprite_index = sprBlueWalk;
		speed = 5;
		if(face==1)
			direction = 0;
		else
			direction = 180;
	break;
}

gun.x = x-5*image_xscale;
gun.y = y-19*image_yscale;
gun.image_angle = point_direction(gun.x, gun.y, mouse_x, mouse_y);
if(gun.image_angle>90&&gun.image_angle<270)
	gun.image_yscale = image_yscale*-1;
else
	gun.image_yscale = image_yscale*1;
gun.image_xscale = image_xscale;
